package com.vastcom.sigma.admin.dao;

import com.vastcom.sigma.admin.model.Bakerecord;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;

import java.util.List;

public interface BakerecordDao extends JpaRepository<Bakerecord,String> {

    @Query("select c from Bakerecord c where c.clqk=:cargocateid ")
    List<Bakerecord> getBakerecordsByClqk(@Param("cargocateid") String cargocateid);


    @Query("select c from Bakerecord c where c.scpc=:scpc")
    List<Bakerecord> getBakerecordsByScpc(@Param("scpc") String scpc);

    @Query("select c from Bakerecord c order by c.hbrq desc ")
    List<Bakerecord> getBakerecordsOrderByHbrq();
}
